﻿<%@ Page Language="VB" AutoEventWireup="false" CodeFile="administrarNoticias.aspx.vb"
    Inherits="noticias_administrarNoticias" MasterPageFile="~/AdmMaster.master" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<div class = "texto-basico">
    <table>
        <tr>
            <td style="width: 22px">
                &nbsp;</td>
            <td style="width: 727px">
                <p class="titulo-pagina">Gerenciamento de Notícias</p></td>
        </tr>
        <tr>
            <td style="width: 22px">
                &nbsp;</td>
            <td style="width: 727px">
                &nbsp;</td>
        </tr>
        <tr>
            <td style="width: 22px">
                &nbsp;</td>
            <td style="width: 727px">
    
    <asp:GridView ID="grvNoticias" runat="server" CellPadding="4" ForeColor="#333333" OnRowCommand="grvNoticias_RowCommand"
        GridLines="None" AutoGenerateColumns="False" DataKeyNames="Id">
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <RowStyle BackColor="white" ForeColor="#F99C5F" />
        <Columns>
            <asp:BoundField DataField="Id" HeaderText="ID">
                <HeaderStyle HorizontalAlign="Center" />
                <ItemStyle HorizontalAlign="Center" Width="30px" />
            </asp:BoundField>
            <asp:BoundField DataField="Titulo" HeaderText="Título">
                <HeaderStyle HorizontalAlign="Center" />
                <ItemStyle HorizontalAlign="Left" Width="170px" />
            </asp:BoundField>
            <asp:BoundField DataField="Ativo" HeaderText="Ativo">
                <HeaderStyle HorizontalAlign="Center" />
                <ItemStyle HorizontalAlign="Center" Width="40px" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="Data Postagem">
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%#  Eval("DataPostagemFormatada") %>'></asp:Label>
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Center" />
            </asp:TemplateField>
            <asp:TemplateField>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:LinkButton ID="LinkButton1" runat="server" CommandName="Edit" SkinID="lnkGridView">Editar</asp:LinkButton>
                    &nbsp;
                    <asp:LinkButton ID="LinkButton2" runat="server" CommandName="Delete" SkinID="lnkGridView">Apagar</asp:LinkButton>
                    <asp:LinkButton ID="LinkButton3" runat="server" CommandArgument='<%#Eval("Id") %>' CommandName="Ativar" SkinID="lnkGridView">Ativar/Desativar</asp:LinkButton>
                </ItemTemplate>
                <ItemStyle Width="97px" />
            </asp:TemplateField>
        </Columns>
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <HeaderStyle BackColor="#e7e7e7" Font-Bold="True" ForeColor="black" />
        <EditRowStyle BackColor="#999999" />
        <AlternatingRowStyle BackColor="#F99C5F" ForeColor="#e7e7e7" />
    </asp:GridView>
   </td>
        </tr>
        <tr>
            <td style="width: 22px">
                &nbsp;</td>
            <td style="width: 727px">
                &nbsp;</td>
        </tr>
        <tr>
            <td style="width: 22px">
                &nbsp;</td>
            <td style="width: 727px">
                <asp:Button ID="addNoticia" Text="Nova notícia" runat="server" BackColor="white" BorderStyle="Solid" 
                    Font-Names="Arial" ForeColor="#F99C5F" />
            </td>
        </tr>
        <tr>
            <td style="width: 22px">
                &nbsp;</td>
            <td style="width: 727px">
                &nbsp;</td>
        </tr>
    </table>
    </div>
</asp:Content> 
